using System.Collections.Generic;

namespace Core
{
    public partial class RandomSkillCoinfig
    {
        public List<RandomSkillCoinfig> childs;
    }

    public partial class RandomSkillCoinfigLoader
    {
        protected override void OnEndLoad()
        {
            foreach (var item in dict.Values)
            {
                var config = item as RandomSkillCoinfig;
                if (config.parent == 0)
                    continue;

                var parentConfig = dict[config.parent] as RandomSkillCoinfig;
                if(parentConfig.childs == null)
                {
                    parentConfig.childs = new List<RandomSkillCoinfig>();
                }
                parentConfig.childs.Add(config);
            }
        }
    }
}